using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using Ent.Voice.Nomination;
using Ent.Web.Helper;

public partial class Controls_Nomination_Details : Ent.Web.WebControl.UserControl
{
    bool _valuesPopulated = false;
    bool _eventSet = false;
    
    protected void Page_Load(object sender, EventArgs e)
    {
        rfvTitle.ErrorMessage = ResourceHelper.Get("MSG_RFVEntryTitle");
        lblTitle.Text = ResourceHelper.Get("LBL_Title");
        lblDescription.Text = ResourceHelper.Get("LBL_Description");
        PopuplateControls();
    }
    public override void Init()
    {
        foreach (string key in Values.Keys)
        {
            if (Values[key] == null)
                continue;
            switch (key)
            {
                case NominationProperty.Title:
                    txtTitle.Text = (string)Values[key];
                    break;
                case NominationProperty.Description:
                    txtDescription.Text = (string)Values[key];
                    break;
                default:
                    break;
            }
        }
    }
    public override void SetEvents() { }
    public override void AddJavascript() { }
    public void PopuplateControls() { }
    public override void Dispose()
    {
        //throw new Exception("The method or operation is not implemented.");
    }
    public override Dictionary<string, object> GetValues()
    {
        Dictionary<string, object> retValue = new Dictionary<string, object>();
        int id = MathFunction.ConvertToInteger(Request.QueryString["id"]);
        retValue.Add(NominationProperty.EntryId, id);
        Session["EVENTID"] = id;
        retValue.Add(NominationProperty.Title, txtTitle.Text);
        retValue.Add(NominationProperty.Description, HttpUtility.HtmlEncode(txtDescription.Text));
        return retValue;
    }
}
